/**

This file is part of MaCI/GIMnet.

MaCI/GIMnet is free software: you can redistribute it and/or modify it 
under the terms of the GNU Lesser General Public License as published 
by the Free Software Foundation, either version 3 of the License, or 
(at your option) any later version.

MaCI/GIMnet is distributed in the hope that it will be useful, but WITHOUT 
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public 
License for more details.

You should have received a copy of the GNU Lesser General Public 
License along with GIMnet. (See COPYING.LESSER) If not, see 
<http://www.gnu.org/licenses/>.

**/
/**
 *
 * $Id: ParameterTypes.hpp,v 1.3 2009-09-23 11:56:14 morsko Exp $
 *
 * \file
 * \brief MaCI - Parameter Interface Type definition header
 * \author Matthieu Myrsky <matthieu.myrsky@tkk.fi>
 *
 */
#ifndef _MACI_PARAMETERTYPES_HPP_
#define _MACI_PARAMETERTYPES_HPP_
#include <inttypes.h>
#include "ownutils.h"
#include "owndebug.h"
#include "common/text.hpp"


namespace MaCI {

  /** MaCI - Parameter interface.
   *
   * This namespace contains all types, methods and helper classes
   * for implementing a Parameter interface for MaCI.
   * Parameter Interface is used for changing parameter that is not
   * descriped in any MaCI interface. 
   */
  namespace Parameter {

    /** Parameter element types.
     * 
     * This enumeration defines the available elements for Parameter interface.
     */
    enum EParameterType { 
      KTypeUnknown                    = -1, ///< Unknown type
      KTypeCommand                    =  1, ///<TCommand element
      KTypeTimestamp                  =  2,
      KTypeParameterXML               =  3,
    };

    /** Parameter commands.
     *
     * Parameter commands for the 'TCommand' structure. Defined in global
     * 'Parameter' namespace because otherwise l^Husers would complain :)
     */
    enum EParameterCommand { 
      KCommandUnknown             = 0, ///< Unkown command
      KCommandGetParameters       = 1, ///< Get Parameters
      KCommandGetParametersReply  = 2,
      KCommandSetParameter        = 3  ///< Set parameter
      
    };
      
    
    /** Parameter interface command.
     *
     * Describes a Command for the Parameter interface. 
     * Commands may required additional dataelements, 
     * and are specified in the descriptions of the commands.
     */
    struct TCommand {
      TCommand(EParameterCommand aCmd = KCommandUnknown) 
	: cmd(aCmd) {}
      
      uint32_t cmd; ///< Command value
    };


    /** Text container containing ParametersXML data.
     */
    typedef Common::TText TParameterXML;

   
  }
}

#endif
